package kfs.light.screen;

public class ZoneBuilder {

	public static Zone buildZone(String zone) {
		Zone screenZone = new Zone();
		int x0 = 0, x1 = 0, y0 = 0, y1 = 0;

		
		String[] split = zone.split("[ ]");
		x0=Integer.parseInt(split[1]);		
		y0=Integer.parseInt(split[2]);
		x1=Integer.parseInt(split[3]);
		y1=Integer.parseInt(split[4]);
		screenZone.setX0(x0);
		screenZone.setX1(x1);
		screenZone.setY0(y0);
		screenZone.setY1(y1);
		return screenZone;
	}

}
